import React, {Component} from 'react';
import axios from "axios";

class App extends Component {
    getData = () => {
        axios.get('http://localhost:3000/api1/getDataDictionary').then((res) => {
            console.log(res.data)
        })
    }
    getCar = () => {
        axios.get('http://localhost:3000/api2/getCar').then((res) => {
            console.log(res.data)
        })
    }

    render() {
        return (
            <div>
                App...
                <button onClick={this.getData}>点击获取数据</button>
                <button onClick={this.getCar}>点击获取数据</button>
            </div>
        );
    }
}

export default App;